char* utfstring;
};
-typedef struct {
+class geocache_data {
+ public:
+ geocache_data() :
+ id(0),
+ type(gt_unknown),
+ container(gc_unknown),
+ diff(0),
+ terr(0),
+ is_archived(status_unknown),
+ is_available(status_unknown),
+ is_memberonly(status_unknown),
+ has_customcoords(status_unknown),
+ placer(NULL),
+ placer_id(0),
+ hint(NULL),
+ favorite_points(0),
+ personal_note(NULL)
+ {}
int id; /* The decimal cache number */
geocache_type type:5;
geocache_container container:4;
utf_string desc_long;
int favorite_points;
char* personal_note;
-} geocache_data ;
+};
typedef struct xml_tag {
char* tagname;
float power; /* watts, as measured by cyclists */
float temperature; /* Degrees celsius */
float odometer_distance; /* Meters? */
- const geocache_data* gc_data;
+ geocache_data* gc_data;
format_specific_data* fs;
session_t* session; /* pointer to a session struct */
void* extra_data; /* Extra data added by, say, a filter. */
queue waypt_head;
static unsigned int waypt_ct;
static short_handle mkshort_handle;
-static geocache_data empty_gc_data = { 0 };
+static geocache_data empty_gc_data;
static global_trait traits;
const global_trait* get_traits(void)
if (wpt->gc_data != &empty_gc_data) {
geocache_data *gc_data = (geocache_data*) xmalloc(sizeof(*gc_data));
- tmp->gc_data = (const geocache_data *)gc_data;
+ tmp->gc_data = (geocache_data *)gc_data;
memcpy(gc_data, wpt->gc_data, sizeof(*gc_data));
if (wpt->gc_data->desc_short.utfstring) {
geocache_data *res = (geocache_data *)wpt->gc_data;
if (res == &empty_gc_data) {
res = (geocache_data*) xcalloc(1, sizeof(*res));
- wpt->gc_data = (const geocache_data *)res;
+ wpt->gc_data = (geocache_data *)res;
}
return res;